//Taken with permission from Dr. Selinski's code repository.

#ifndef _NODE_H
#define _NODE_H

// forward declarations
template <class T> class Set;   // so Node can make it a friend
template <class T> class SetIter;


template <class T>
class Node
{
private:
  T info;
  Node<T> * next;	// link to next node

public:
  Node() 	:  next(0)	{ }   // calls default constructor for T info
  Node(T n, Node * link = 0) : info(n), next(link)  { }

friend class Set<T>;  // let Set access private members
friend class SetIter<T>;  // let SetIter access private members

} ;  // end of class Node definition

#endif
